"use strict";
var Color;
(function (Color) {
    Color[Color["red"] = 0] = "red";
    Color[Color["skyblue"] = 1] = "skyblue";
    Color[Color["sandybrown"] = 2] = "sandybrown";
    Color[Color["yellow"] = 3] = "yellow";
})(Color || (Color = {}));
const btns = Array.from(document.querySelectorAll('button'));
btns.forEach((item, index) => {
    item.addEventListener('click', (e) => {
        var _a;
        // console.log(item)
        let div = document.createElement('div');
        div.className = 'dis';
        (_a = document.querySelector('body')) === null || _a === void 0 ? void 0 : _a.appendChild(div),
            div.style.background = Color[index];
        let is = item.getAttribute('text');
        div.innerHTML = is;
        //  console.log(is)
        setTimeout(() => {
            let dis = document.querySelector('.dis');
            dis === null || dis === void 0 ? void 0 : dis.remove();
        }, 3000);
    });
});
